package com.woniu.dao;

import com.woniu.entity.RbacManager;
import com.woniu.entity.RbacManagerDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author:陈涵
 * @Do:
 * @date: 2022/9/1 23:18
 */
@Mapper
public interface RbacManagerDao {
    RbacManager findOne (@Param("username") String username,@Param("password") String password);
    List<RbacManager> findAll();

    int deleteOne(int id);

    int addOne(RbacManager rbacManager);

    int findCountByName(String account);

    int editOne(RbacManager rbacManager);

    int findCountByNameOrId(RbacManager rbacManager);

    RbacManager findOneByName(String username);

    int editType(@Param("id") int id,@Param("status") String status);

    int updateInitPwd(int id,String newPassword);

    int updateRole(RbacManagerDTO rbacManagerDTO);

    RbacManager findOneById(int id);
}
